home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_11 / allison / pool.h < prev    next >
C/C++ Source or Header  |  1994-09-05  |  378b  |  14 lines

  1. LISTING 30 - C interface for a generic memory pool manager
  2. /* pool.h */
  3. #include <stddef.h>
  4.  
  5. /* Incomplete type: */
  6. typedef struct Pool Pool;
  7.  
  8. /* Pool management functions */
  9. Pool *pool_create(size_t elem_size, size_t init_alloc,
  10.                   size_t extent);
  11. void *pool_get_elem(Pool *p);
  12. void pool_release_elem(Pool *p, void *elem);
  13. void pool_free(Pool *p);
  14.